-
Notifications
You must be signed in to change notification settings - Fork 111
Major refactor of frontend #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the frontend to use Vite instead of Create React App, consolidates service ports and environment URLs (including telemetry consumer), and updates Kubernetes manifests to align with the new port configuration.
- Migrate frontend build from CRA to Vite and update Dockerfile
- Adjust telemetry-consumer environment URLs to new service names
- Update k8s manifests (services and deployments) to expose port 4173 for the frontend and port 8080 for the backend
Reviewed Changes
Copilot reviewed 197 out of 211 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| telemetry-consumer/bl-telemetry.docker.env | Corrects service hostnames for Prometheus, Jaeger, Pushgateway, and NATS |
| k8s/service-todo-frontend.yaml | Changes service port from 3000 to 4173 for the frontend |
| k8s/service-todo-backend.yaml | Consolidates backend service ports to 8080 only |
| k8s/deployment-todo-frontend.yaml | Updates containerPort to 4173 in the frontend deployment |
| k8s/deployment-todo-backend.yaml | Updates containerPort to 8080 in the backend deployment |
| frontend/vite.config.ts | Adds basic Vite configuration for React |
| frontend/tsconfig*.json | Splits and adjusts TypeScript configs for Vite |
| frontend/README.md | Updates documentation to reflect Vite migration |
| frontend/Dockerfile | Updates base image, build commands, and exposed port |
Comments suppressed due to low confidence (5)
frontend/src/pages/Register/page.tsx:33
- When using
as={RouterLink}, you should pass thetoprop instead ofhrefto drive client-side routing (<Link as={RouterLink} to="/login">).
<Link as={RouterLink} href="/login">
frontend/src/pages/Login/page.tsx:33
- RouterLink expects a
toprop rather thanhref(<Link as={RouterLink} to="/register">) for proper client-side navigation.
<Link as={RouterLink} href="/register">
k8s/service-todo-frontend.yaml:11
- This port entry is missing the leading
-andprotocol: TCP. It should be:- protocol: TCP
port: 4173
targetPort: 4173
- protocol: TCP
port: 4173
k8s/service-todo-backend.yaml:11
- Ensure this port entry is in the proper list item with
- protocol: TCPabove it:- protocol: TCP
port: 8080
targetPort: 8080
- protocol: TCP
port: 8080
This pull request primarily fixes security issues with old packages, replaces create-react-app with Vite, removes Envoy and gRPC-Web, updates the
README.mddocumentation and backend code to reflect architectural changes, improve API consistency, and upgrade dependencies. Key changes include the deprecation of gRPC in favor of OpenAPI, updates to URLs and ports, enhancements to DTOs with Swagger annotations, and dependency upgrades to support newer features.Documentation Updates:
README.md: Deprecated gRPC references, updated URLs and ports, added Vite to frontend description, and expanded the table of contents with detailed sections. [1] [2] [3] [4] [5] [6]Backend Configuration Changes:
backend/Dockerfile: Updated URLs for authentication and registration endpoints, consolidated port exposure to8080.backend/frontend-development.docker-compose.yml: Adjusted port mappings to align with the updated backend configuration.Dependency and Version Upgrades:
backend/package.json: Upgraded project version to0.2.0, replaced older dependencies with newer ones such as Fastify and Swagger, and updated TypeScript to a newer version. (Fad13e1aL5R5, [1] [2] [3]API Enhancements:
backend/src/api/api.module.ts: Replaced the gRPC controller with an SSE controller and adjusted module imports to use local library paths. [1] [2]backend/src/api/dto): Enhanced DTOs with Swagger annotations for improved API documentation and validation. Added new DTOs likeGetAllTodosResponseDtoand updated existing ones for consistency. [1] [2] [3] [4] [5] [6]Event Handling Updates:
backend/src/api/pub-sub-handlers/todo-added.integration-handler.ts: Updated references to use the SSE controller instead of the gRPC controller.